<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
>
<head>
    <meta charset="UTF-8"/>
    <title>Thymeleaf in action</title>
</head>
<body>
<div th:replace="~{fragements/header::head}"></div>
<!--<div>-->
    <!--<h1> Thymeleaf in action</h1>-->
    <!--<a href="/users">首页</a>-->
<!--</div>-->
<h3 th:text="${title}"></h3>
<div>
    <a th:href="@{/users/form}">创建用户</a>
</div>
<table border="1">
    <thead>
    <tr>
        <td>ID</td>
        <td>Email</td>
        <td>Name</td>
        <td>操作</td>
    </tr>
    </thead>
    <tbody>
    <tr th:if="${userList.size()} eq 0">
        <td colspan="3">没有用户信息！</td>
    </tr>
    <tr th:each="user:${userList}">
        <td th:text="${user.id}"></td>
        <td th:text="${user.email}"></td>
        <td >
            <a th:href="@{'/users/'+${user.id}}" th:text="${user.name}"></a>
        </td>
        <td >
            <a th:href="@{'users/delete/'+${user.id}}">删除</a>
            <a th:href="@{'users/modify/'+${user.id}}">修改</a>
        </td>
    </tr>
    </tbody>
</table>
<!--<div>-->
    <!--<a href="http://www.baidu.com">百度一下</a>-->
<!--</div>-->
<div th:replace="fragements/footer::footer"></div>
</body>
</html>